<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    //reverse函数，反转数组
    let arr = [1,3,5,4,7,5,4];
    let res = [];
    let index = 0;
        for (let i = arr.length - 1;i >= 0;i--){
            res[index] = arr[i];
            index++;
        }
    console.log(arr.toString());
    arr = res;
    console.log(arr.toString());
</script>

</body>
</html>